from app import create_app
from flask import send_from_directory
import os

app = create_app()

# 添加缓存控制
@app.after_request
def add_header(response):
    # 静态资源缓存 1 周
    if 'Cache-Control' not in response.headers:
        response.headers['Cache-Control'] = 'public, max-age=604800'
    return response

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True) 